DataCollection | ComponentOne
C1.DataCollection.EntityFrameworkCore Assembly / C1.DataCollection.EntityFrameworkCore Namespace / C1EntityFrameworkCoreVirtualDataCollectionBase<T> Class / ReplaceAsyncOverride Method
The index of the replaced item.
The replaced item.
The cancellation token.

In This Topic
    ReplaceAsyncOverride Method (C1EntityFrameworkCoreVirtualDataCollectionBase<T>)
    In This Topic
    This method is called when an item is replaced in the collection.
    Syntax
    'Declaration
     
    Protected Overridable Function ReplaceAsyncOverride( _
       ByVal index As Integer, _
       ByVal item As T, _
       ByVal cancellationToken As CancellationToken _
    ) As Task(Of Integer)
    protected virtual Task<int> ReplaceAsyncOverride( 
       int index,
       T item,
       CancellationToken cancellationToken
    )

    Parameters

    index
    The index of the replaced item.
    item
    The replaced item.
    cancellationToken
    The cancellation token.
    Remarks
    CanReplace must return true to enable this method.
    See Also